package design_pattern.chain.cycleChain;

public class Client {
    public static void main(String[] args) {
	Request req = new Request();
	Response resp = new Response();
	req.setEmail("lewis.liu@quest.com");
	req.setQQnumber("408674000");
	req.setPassword("123456");
	req.setConfirmPassword("123456");
	req.setUsername("lewis");
	
	IntercepterChain chain = new IntercepterChain();
	chain.addIntercepter(new PasswordIntercepter()).addIntercepter(new UsernameIntercepter()).addIntercepter(new EmailIntercepter()).addIntercepter(new QQnumberIntercepter());
	chain.doIntercept(req, resp, chain);
	System.out.println(resp);
    }
}
